﻿using static System.Console;

/*
 *利用三重嵌套循环来找出此2*3*3三维数组中所存储数值中的最小值
 */

int[,,] num =
{
    { { 33, 45, 67 }, { 23, 71, 56 }, { 55, 38, 66 } },
    { { 21, 9, 15 }, { 38, 69, 18 }, { 90, 138, 166 } }
};


int min = num[0, 0, 0];

for (int i = 0; i < 2; i++)
{
    for (int j = 0; j < 3; j++)
    {
        for (int k = 0; k < 3; k++)
        {
            if (min > num[i, j, k])
            {
                min = num[i, j, k];
            }
        }
    }
}

WriteLine($"最小值 = {min}" + '\n');
ReadKey();